﻿@using Orchard.DynamicForms.Elements
@using Orchard.Layouts.Helpers
@{
    var element = (Taxonomy)Model.Element;
    var attributes = (IDictionary<string, object>)TagBuilderExtensions.GetCommonElementAttributes(Model);
    var name = String.IsNullOrWhiteSpace(element.Name) ? "MultiSelectList1" : element.Name;
    var options = (IEnumerable<SelectListItem>)Model.TermOptions;
}
@if (element.ShowLabel) {
    <label for="@element.HtmlId">@Html.Raw(element.Label)</label>
}
@Html.ListBox(name, options, attributes)